<template>
  <div>
    <hr />
    御剑乘风来,除魔天地间!====son==={{ sonMsg }}==={{appMsg}}
    <button @click="sonChange">更改father的值</button>
    <button @click="changeApp('son更改了app的值')">更改app的值</button>
  </div>
</template>
<script>
export default {
  data() {
    return {
      sonMsg: "这里是son",
    };
  },
  created() {},
  computed: {},
  inject: ["appMsg", "changeAppMsg"],
  methods: {
    sonChange() {
      this.$parent.fatherMsg = "Son把值改啦";
    },
    changeApp(msg) {
      this.changeAppMsg(msg);
    },
  },
};
</script>
<style lang='less'  scoped>
</style>
